package java3_23.Zoo;
//海豹子类
public class Seal extends Mammal implements Swimming{
    public Seal(String name, String sex, String type) {
        super(name, sex, type);
    }

    @Override
    public void eat() {
        System.out.println(getType()+getName()+"正在吃鱼");
    }

    @Override
    public void play() {
        System.out.println(getType()+getName()+"正在水里嬉戏");
        Seal.this.swim();
    }


    @Override
    public void swim() {
        System.out.println(getType()+getName()+"在水里游泳");
    }
}
